package com.lagou.service.impl;

import com.lagou.service.TPService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;

@Service
public class TPServiceImpl implements TPService {
    @Override
    public void methodA() {
        Random random = new Random();
        System.out.println("A is called");
        int time = random.nextInt(100);
        try {
            Thread.sleep(time+1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void methodB() {
        Random random = new Random();
        System.out.println("B is called");
        int time = random.nextInt(100);
        try {
            Thread.sleep(time+1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void methodC() {
        Random random = new Random();
        System.out.println("C is called");
        int time = random.nextInt(100);
        try {
            Thread.sleep(time+1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
